//声明 获取医院列表数据的参数接口
export interface ReqGetHospitalListParams {
  page: number; //页码数
  limit: number; //每页显示的数量
  hoscode?: string; // 医院的编号
  hosname?: string; // 医院名称
  hostype?: string; //医院类型
  provinceCode?: string; //省份编号
  cityCode?: string; //城市编号
  districtCode?: string; //区域编号
  status?: number; //状态
}

//医院基本信息的接口
export interface HospitalBaseInfo {
  id: string;
  createTime: string;
  updateTime: string;
  isDeleted: number;
  param: {
    hostypeString: string;
    fullAddress: string;
  };
  hoscode: string;
  hosname: string;
  hostype: string;
  provinceCode: string;
  cityCode: string;
  districtCode: string;
  address: string;
  logoData: string;
  intro: string;
  route: string;
  status: number;
}

//声明接口 约束单个医院信息的结构
export interface HospitalListItem extends HospitalBaseInfo {
  bookingRule: BookingRule;
}

//声明复数
export type HospitalListItems = HospitalListItem[];

//声明接口 约束响应结果的结构
export interface ReqHospitalListResponse {
  content: HospitalListItems;
  totalElements: number;
  totalPages: number;
  last: boolean;
  first: boolean;
  sort: {
    sorted: boolean;
    unsorted: boolean;
    empty: boolean;
  };
  numberOfElements: number;
  size: number;
  number: number;
  empty: boolean;
}

//声明接口 限制省 市 县的结构
export interface ProvinceItem {
  id: number;
  createTime: string;
  updateTime: string;
  isDeleted: number;
  param: {};
  parentId: number;
  name: string;
  value: string;
  dictCode: null;
  hasChildren: boolean;
}

//声明一个新的类型
export type ProvinceItems = ProvinceItem[];

//预约规则的接口
interface BookingRule {
  cycle: number;
  releaseTime: string;
  stopTime: string;
  quitDay: number;
  quitTime: string;
  rule: string[];
}

//医院详情单个医院的结构
interface HospitalShowItem extends HospitalBaseInfo {
  bookingRule: null;
}

//声明医院详情响应结果的结构
export interface HospitalShowResponse {
  bookingRule: BookingRule;
  hospital: HospitalShowItem;
}

//设置单个科室的结构
export interface Department {
  depcode: string;
  depname: string;
  children: Department[] | null;
}

//声明科室响应结果的类型
export type ReqGetDepartmentsResponse = Department[];

//声明获取排班规则的参数结构
export interface ReqGetScheduleRulesParams {
  page: number;
  limit: number;
  hoscode: string;
  depcode: string;
}

//单个排班规则的结构
export interface ScheduleRuleItem {
  workDate: string;
  workDateMd: null;
  dayOfWeek: string;
  docCount: number;
  reservedNumber: number;
  availableNumber: number;
  status: null;
}

//声明排班规则的响应结果结构
export interface ReqGetScheduleRulesResponse {
  total: number;
  bookingScheduleList: ScheduleRuleItem[];
  baseMap: {
    hosname: string;
  };
}

//声明请求获取医生列表的参数接口
export interface ReqGetDoctorsParams {
  hoscode: string;
  depcode: string;
  workDate: string;
}

//单个医生的结构
export interface DoctorItem {
  id: string;
  createTime: string;
  updateTime: string;
  isDeleted: number;
  param: {
    dayOfWeek: string;
    depname: string;
    hosname: string;
  };
  hoscode: string;
  depcode: string;
  title: string;
  docname: string;
  skill: string;
  workDate: string;
  workTime: number;
  reservedNumber: number;
  availableNumber: number;
  amount: number;
  status: number;
  hosScheduleId: string;
}

//医生响应结果的结构
export type ReqGetDoctorsResponse = DoctorItem[]; 
